package com.morrislabs.graph
{
	import mx.rpc.http.HTTPService;
	import mx.rpc.events.ResultEvent;

			
	public class GraphXML
	{
		private var service:HTTPService = new HTTPService();
		
		public function GraphXML()
		{
 		    service.resultFormat = "e4x";
			//service.showBusyCursor = true;
		}
			
		/** Initiates the fetch of a XML file. When the file has finished loading,
			it will be processed in the gotData function. */
		public function loadXMLFile(file: String, resultCallback:Function): void {
			service.url = 'xmlfiles/' + file + '.xml';
			
			service.addEventListener(ResultEvent.RESULT, resultCallback);
			service.send();
		}
				



	}
}